import com.example.homework1.entity.A;
import com.example.homework1.entity.ConfigText03;
import com.example.homework1.entity.People;
import com.example.homework1.entity.Student;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class text {

    @Test
    void xmlzhuru(){
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("application.xml");
        Student student = applicationContext.getBean("xml01",Student.class);
        student.display();
    }
    @Test
    void zhuru02(){
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("application.xml");
        People people01 = applicationContext.getBean("people01",People.class);
        people01.Method();
    }
    @Test
    void Javazhuru(){
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ConfigText03.class);
        A a = applicationContext.getBean(A.class);
        a.display();
        a.display01();


    }
}
